package com.yby.dome2;

/**
 * 球类
 */
public class Ball extends Round{
    double volume;
    public double getArea(){
        setRadius(5);
        getRadius();
        area = 4 * Math.PI * radius * radius;
        System.out.println("球类面积"+area);
        return area;
    }
    public void volume(){
        setRadius(5);
        getRadius();
        volume = 4/3.0 * Math.PI * radius * radius * radius;
        System.out.println("球的体积"+volume);
    }
}

